package com.lq.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.lq.Dao.UserDao;
import com.lq.pojo.User;
import com.lq.service.UserService;
import com.lq.util.Pager;

@Service("userService")
public class UserServiceImpl implements UserService{
	@Resource
	private UserDao userDao;
	
	@Override
	public List<User> selByUsers() {
		List<User> list =null;
		try {
			list = userDao.selByUsers();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}


	@Override
	public int addByUser(String name, String password, String personalIcon) {
		int index=0;
		try {
			index = userDao.addByUser(name, password, personalIcon);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return index;
	}

	@Override
	public List<User> selByname(String name,String password){
		List<User> users=null;
		try {
			 users = userDao.selByname(name,password);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return users;
	}


}
